<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);

switch ($language){
    case "cs":
        include("lang/cs.php");
        break;
    default: // default english
        include("lang/en.php");
        break;
};

?>

<!DOCTYPE html>
<html lang="<?php echo $language; ?>">
  <head>
    <meta charset="utf-8"/>
    <title><?php echo $lang['PAGE_TITLE']; ?></title>
    <meta name="author" content="Stanislav Hruška | stanislav.hruska@gmail.com"/>

    <link rel="stylesheet" type="text/css" media="screen" href="css/style.css"/>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/plugins.js" type="text/javascript"></script>
    <script src="js/default.js" type="text/javascript"></script>

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

  <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-309556-22', 'modoro.cz');
  ga('send', 'pageview');

  </script>

</head>
  <body>

    <h1 id="timer" class="center">25:00</h1>
    <h2 id="name"><span class="pomodoro"><?php echo $lang['NAME_POMODORO']; ?></span> <span class="break"><?php echo $lang['NAME_BREAK']; ?></span> <a href="#" class="question">?</a></h2>

    <p id="desc">
      <span class="pomodoro"><?php echo $lang['DESC_POMODORO']; ?></span>
      <span class="break"><?php echo $lang['DESC_BREAK']; ?></span>
    </p>

    <p id="control"><a class="btn btn-large" href="#"><i class="icon-off"></i> <span><?php echo $lang['CONTROL_START']; ?></span></a></p>
    <p id="numberofcycles"><?php echo $lang['DESC_TODAY']; ?>: <span>0</span></p>

    <!-- <p id="skipbreak"><a class="btn btn-link" href="#"><span>Začít znovu</span> &raquo;</a></p> -->

    <div class="alert alert-success" id="permission">
      <?php echo $lang['PAGE_CHROME_PERMISSION']; ?>
      <button class="btn btn-small btn-success" type="button"><?php echo $lang['CONTROL_ALLOW']; ?></button>
    </div>

    <footer>&copy; 2013 Standa HeWeR Hruška | <?php echo $lang['PAGE_LICENCE']; ?> | <a href="https://code.google.com/p/modoro/">Google Code</a></footer>

    <div id="welcome" class="modal hide fade">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h3><?php echo $lang['INFO_HEADER']; ?></h3>
      </div>
      <div class="modal-body">

      <?php echo $lang['INFO_CONTENT']; ?>

      </div>
      <div class="modal-footer">
        <a href="#" class="btn btn-large btn-success" data-dismiss="modal"><i class="icon-thumbs-up"></i> <?php echo $lang['CONTROL_YEA']; ?></a>
      </div>
    </div>

  </body>
</html>